from django.db import models

# Create your models here.


class Student(models.Model):
    class Meta:
        db_table = 'Student'

    ID = models.IntegerField(primary_key=True)
    NAME = models.CharField(max_length=14,verbose_name='姓名')
    AGE = models.IntegerField(verbose_name='年龄')

class Score(models.Model):
    class Meta:
        db_table = 'Score'

    ID = models.IntegerField(primary_key=True)
    COURSE = models.CharField(max_length=14,verbose_name='课程')
    SCORE = models.IntegerField(verbose_name='成绩')
    STU = models.ForeignKey('Student',on_delete=models.CASCADE)
